@section('title')
    我的收藏 @parent
@show
@section('subcontent')
<!-- 我的收藏 -->
<div id="mainUserInfo">
<div class="mod-main mod-comm lefta-box">
    <div class="mt">
		<h3 class="curr">我的收藏</h3>
    </div>
    <div class="mc">
    	<div class="followed-0">
	    	<table class="tb-void" width="100%" border="0" cellspacing="0" cellpadding="0" style="padding-top:20px">
			    <tbody>
			    	<?php 
			        foreach($data as $key => $value) {
			        	if(!$value['collect_type'])continue;
			        ?>
			    	<dl class="artivleSharelist clear">
			    		<dd style="color:#999;margin-bottom:10px;">
			    			<span style="margin:0 100px 0px 5px;">{{ $value['collect_type_str'] }}</span>
				        	<span>{{ $value['created_at'] }} 收藏</span>
		        		</dd>
			        	<dd style="width:840px;">
			        		<a style="font-size: 16px;" href="{{ $value['url'] }}" >{{ $value['title'] }}</a>
				        	<div class="numlr">
				        		<a href="javascript:void(0);" data-id="{{ $value['item_id'] }}" data-href="{{ $value['collect_type'] }}" class="delete button-bg"  style="color:#fff;"> 删&nbsp;&nbsp;&nbsp;&nbsp;除 </a>
				        	</div>
			        	</dd>
			        	{{ Form::token() }}
			        </dl>
			        <?php 
			        }
			        ?>
			    </tbody>
			</table>
		</div>
    </div>
</div>
</div>
<script type="text/javascript">
var jumpUrl = "{{ Config::get('app.url') }}";
//删除
$(document).on( "click", ".delete", function(e) {
		var url = '{{ route("collect.delete") }}';
		var collect_type = $(this).attr("data-href");
		var item_id = $(this).attr("data-id");
	    $.post(url,{"item_id":item_id,"collect_type":collect_type},function(data){
	        
	      },'json').error(function(data) {
	          var obj = $.parseJSON(data.responseText);
	          
	      }).success(function(data) {
	          layer.msg("删除成功");
	          window.location.href=jumpUrl+'/center/collect';
	      });
	      stopDefault(e); 
	});
</script>
@show